/**
 * 
 */
package com.zc.spring.reflect;

import java.lang.reflect.InvocationTargetException;

/**
 * @author ZhangCheng
 * @time 2019年11月1日
 */
public class TestInvoke {

	/**
	 * @param args
	 * @throws ClassNotFoundException 
	 * @throws SecurityException 
	 * @throws NoSuchMethodException 
	 * @throws InstantiationException 
	 * @throws InvocationTargetException 
	 * @throws IllegalArgumentException    
	 * @throws IllegalAccessException 
	 */
	public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {
		Class a = Class.forName("com.zc.reflect.Banana");
		a.getDeclaredMethod("createFruit1",String.class).invoke(a.newInstance(), "1213");
		
	}

}
